//
//  main.swift
//  PrattParser
//
//  Created by 神经骚栋 on 2023/9/4.
//

import Foundation

var code = "1+2*3"

var lexer: Lexer! = Lexer(code: code)

var parser: Parser! = Parser(lexer)

var expression: Expression? = parser.parseMain()

if let intObj = Evaluator.eval(expression) as? MInt {
    print(intObj.toString())
}
